namespace CSSharpPro._1023;

public class Student
{
        // 基本属性
        public string StudentId { get; set; }
        public string Name { get; set; }
        public int Age { get; set; }
        public string Gender { get; set; }
        public string Major { get; set; }
        public double Gpa { get; set; }

        // 构造函数
        public Student()
        {
        }

        public Student(string studentId, string name, int age, string gender, string major, double gpa)
        {
            StudentId = studentId;
            Name = name;
            Age = age;
            Gender = gender;
            Major = major;
            Gpa = gpa;
        }

        // 显示学生信息的方法
        public void DisplayInfo()
        {
            Console.WriteLine($"学号: {StudentId}, 姓名: {Name}, 年龄: {Age}, 性别: {Gender}, 专业: {Major}, GPA: {Gpa}");
        }
    }
